﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DifferentDisplay
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void Form2_Load(object sender, EventArgs e)
        {
           
            //this.StartPosition = FormStartPosition.Manual;
            //Screen[] screens = System.Windows.Forms.Screen.AllScreens;
            //if (screens.Length >= 2)
            //{
            //    //for (int i = 0; i < screens.Length; i++)
            //    {
            //        //获取扩展屏
            //        // Screen childerScreen = screens[screens.Length - 1];
            //        Screen childerScreen = screens[screens.Length - 1];
            //        this.Width = childerScreen.Bounds.X;
            //        this.Height = childerScreen.Bounds.Y;

            //        //this.Width = childerScreen.Bounds.Width;
            //        //this.Height = childerScreen.Bounds.Height;

            //        // this.WindowState = FormWindowState.Maximized;//默认最大化 异屏不会生效
            //        this.Location = childerScreen.WorkingArea.Location;
            //    }
            //}
        }
    }
}
